package com.hhkj.admin.course.service.extend.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hhkj.admin.course.domain.CoursePriceConf;
import com.hhkj.admin.course.model.dopo.CoursePriceConfDo;
import com.hhkj.admin.course.model.dopo.CoursePriceConfPo;
import com.hhkj.admin.course.service.base.CoursePriceConfService;
import com.hhkj.admin.course.service.extend.CoursePriceConfExtendService;
import com.ruoyi.common.base.biz.service.extend.BaseExtendServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class CoursePriceConfExtendServiceImpl
        extends BaseExtendServiceImpl<CoursePriceConf, CoursePriceConfDo, CoursePriceConfPo, CoursePriceConfService>
        implements CoursePriceConfExtendService {

    @Override
    public CoursePriceConf getByCourseId(Long courseId) {
        LambdaQueryWrapper<CoursePriceConf> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CoursePriceConf::getCourseId, courseId);
        return this.getService().getOne(queryWrapper, false);
    }
}
